home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-11
/
gl101.zip
/
READ.ME
< prev
next >
Wrap
Text File
|
1991-06-27
|
26KB
|
529 lines
The Graphics Language
For
Clipper 5.01
(Version 1.01)
Addendum Documentation
24 June 1991
______________________________________________________________________________
Change Summary: 24 June 1991 [Release v1.01]
- Changed all PUBLIC arrays and variables to STATIC. Also changed all
PRIVATE arrays to LOCAL declarations.
- Modified the SET MOUSE command to account for the change to Clipper 5.01
that caused the function ONOFF() to be eliminated.
- Modified the three business objects so that the SELECT() function handles
the saving and restoring of the plot databases properly.
- Modified the VIEWICON utility to enable the display of separate as well
as composite icons and fixed a bug in the composite display that
previously used the color command for each of the four color planes.
- Established preprocessor constants for NoSuchHandle and NoLabelsLeft and
set to error codes 04 and 05 respectively.
- Modified the VIEWICON and MENUDEMO programs to change all PRIVATE
variables to LOCAL variables. Also note that both the VIEWICON and
MENUDEMO programs must be compiled with the /N option.
______________________________________________________________________________
Design Issues:
- The event array only contains the super icon number in the case of a
physical object. This needs to change so that once an icon event is de-
fined, the programmer need not worry if the icon file is loaded when the
event is activated. The problem will manifest itself when different icons
have been selected during the define sequence from multiple icon files, and
activation occurs later among those disparate icons. The work around for
this is that you always immediately activate when defining an icon, but
you won't be able to refresh the icons without reloading each icon file.
This can be changed if(when) icons can be collectively stored in a dynamic
file. Icon "labels" will also help alleviate this design flaw.
- It may be that the event region coordinates will need to be stored in a
different part of the array separate from the phisical object coordinates.
Currently, we use the physical coordinates as the basis for the click re-
gion. This is not the best methodology because there will be times when
a programmer will want a mouse hot region that is larger or perhaps smaller
than the object itself. This does not impact invisible objects however.
- Since The Graphics Language supports both row/column and cartesian posi-
tioning coordinates, all further reference to coordinates will be specified
as Pos1,Pos2 where Pos1 is the Clipper row number from 0 to 24, or the car-
tesian horizontal (X) coordinate from 0 to 1350. Pos2 cooresponds to the
Clipper column coordinates from 0 to 79, or the cartesian vertical co-
ordinates 0 to 1000. In version 1.0 however, there is no support for the
use of the Cartesion coordinates. That will come later on in version 1.1.
- Currently there are no functions that allow a programmer to inquire about
changes that occur in the event array when a mouse button is clicked.
These will be added after the first Beta Test pass.
- The business charts currently use a FILTER command and this should be
changed to facilitate faster processing on large files. I suggest that
anyone thinking about using the FILTER clause should consider a different
method of isolating data from large files. Then use the GL commands on
the smaller database subsets.
- The FLASH command is basically a "redraw" command and this should change
to a method that uses Xor to simulate a flashing when an object is clicked
on.
- There is an experimental menu function in a new sample program named
MENUDEMO.PRG. It demonstrates the characteristics of a planned menu
object that has three dimensional attributes. The function creates an
array of menu choices and further uses that array to create multiple
event regions in the Graphics Language event array. There has been very
little testing and use of this function. It is only provided for
demonstration purposes.
- All color and other constants are coded as manifest constants in the .CH
file. Unfortunately, this means that they are hard coded into any
function in the library that uses them. Users will not be able to change
these unless you provide the source to the LIB as well as the CH.
- Perhaps there should be VCENTER and VTOP options for the DRAW text
command.
______________________________________________________________________________
Change Summary: 29 Jan 1991 to 05 Feb 1991 [Beta v1.0f]
- Modified the __DrawBevel() function to display the first box in a pattern
fill of 20 to clear the area.
- Modified the __DrawBevel() function to save the current Clipper color and
then restore it afterwards.
- Fixed a bug in the __WordToColor() function that was causing color incon-
sistencies due to Clipper's inconsistent return values as discovered by
Peter Freese.
______________________________________________________________________________
Change Summary: 23 Jan 1991 to 28 Jan 1991 [Beta v1.0e]
- Fixed a bug in the bar chart color statement so that it now will support
the word COLOUR as well as COLOR.
- Modified the SET MOUSE ON command to check for the existence of a mouse
driver, and abort if unavailable.
- Modified the __PieChart() function to use a more appropriate normalizing
algorithym recommended by BPS.
______________________________________________________________________________
Change Summary: 18 Jan 1991 to 23 Jan 1991 [Beta v1.0d]
- The commands DRAW BOX and CLEAR GRAPHICS WINDOW have a new command clause
option called BEVEL. When used with DRAW BOX, the box will have beveled
edges and appear to be 3 dimensional. The color support for the various
bevel surfaces are defined in the GLLIBR.CH header file. When used with
the CLEAR GRAPHICS WINDOW command, BEVEL will clear a window area that is
slightly larger. This is necessary because beveled boxes are displayed
slightly larger. Future vuersions will enable better color control from
the command language rather that hard coded color schemes.
- A bug in the PCL5 optional clause of SET VECTOR PRINT has been fixed.
- A bug in the SET VECTOR PRINT command that causes the PATTERN variable
not to be passed from the command to the function has been fixed.
- A bug in the SET VECTOR PRINT command that causes a case sensitive eval-
uation of the MMS clause has been fixed to ingnor case sensitivity.
- Two new optional clauses have been added to the DRAW <text> command that
enable centered and right justification modes to be invoked. The command
options are CENTERED, and RIGHT. For example, the following syntax could
be used to display a title in the center of the screen on line 2.
draw "The Graphics Language" at 02,40 using system 1609 center
Note that the CENTER command invokes "centering" at the column origin.
Also note that the DRAW <text> command defaults to left justification,
but the word LEFT may be used in the command syntax. The LEFT clause is
a no-op command.
- The SET GRAPHICS PRINT command has been changed and now requires only one
parameter, LPT1, LPT2, LPT3, COM1, or COM2. For example, to send printer
output to a serial printer attached to COM1, the following syntax is
appropriate.
SET GRAPHICS PRINT TO com1 // send output to serial, com1
- The WAIT EVENT command has been modified to continue looping until a valid
click region has been selected.
- A bug in the __DgeColor() function was causing Clipper color settings to
be evaluated improperly. This has been fixed.
- The DRAW BAR CHART command has been altered in the following ways:
> The COLOR option now accepts a color parameter instead of alternating
the colors of the bars. The COLOR option is used to specify the color
of the bars. The current Clipper color will be used lacking a COLOR
specification.
> The 3D option now draws the outline of the bars but does not fill the
bar displays.
______________________________________________________________________________
Change Summary: 01 Jan 1991 to 18 Jan 1991 [Beta v1.0c]
- The FIX POSITION AT and SET DGE VERSION TO commands have been removed from
the product. They serve no useful purpose at the present time.
- The SET POSTSCRIPT PRINT command has been changed to SET VECTOR PRINT with
command option modifications as follows:
- The PCL5 and/or LASERJET optional clauses are the default.
- The POSTSCRIPT optional clause is new.
- The GREYSCALE optional clause is new and applies to PCL5/LASERJET III
printing only.
All other optional statements that have been previously documented remain
unchanged. See the command documentation below for complete details.
- The only changes that have been made to the documentation are the removal
of FIX POSITION AT and SET DGE VERSION. Additionally, the SET POSTSCRIPT
PRINT command has changed to SET VECTOR PRINT as shown below. Note that
there have been changes to the command options in SET VECTOR PRINT. Also
note that these changes have been updated to the Norton Guide database
included with beta version 1.0c.
SET VECTOR PRINT
Description:
This command toggles vector printing to an ON or OFF state and accepts
commands to control page eject, color, and other aspects of vector
printing. This command, without any arguments will toggle vector
printing off and eject the current page.
Syntax:
SET VECTOR PRINT [ON] [OFF]
[HORIZONTAL OFFSET <hoffset>]
[VERTICAL OFFSET <voffset>]
[HORIZONTAL LENGTH <hlength>]
[UNITS <units>]
[VERTICAL SCALE <vscale>]
[PORTRAIT]
[PCL5]
[LASERJET]
[POSTSCRIPT]
[WINDOW]
[COLOR]
[PATTERN]
[EJECT]
[NOEJECT]
Arguments:
<hoffset> is the horizontal offset from the left of the page.
<voffset> is the vertical offset from the base of the page.
<hlength> is the base length of the image on the page.
<units> is the specifies either "MMS", points "1/72" nd of an inch, or
"1/100" th of an inch.
<vscale> is the specifies the Cartesian Y axis scale factor percent.
[PORTRAIT] is the invokes an orientation angle on page of 90 degrees.
[PCL5] invokes a printing mode that supports HPGL, LaserJet III and above,
and any printer that supports HPGL plotter emulation.
[LASERJET] is synonomous with PCL5.
[POSTSCRIPT] invokes a Postscript printing mode.
[WINDOW] prints within the current clipping window.
[COLOR] is the invokes postscript color printing mode.
[PATTERN] is the invokes postscript pattern priority.
[NOEJECT] is the suppresses page ejecting when toggling postscript
printing to the OFF state.
Example:
SET VECTOR PRINT ON LASERJET // toggle vector print on
* drawing commands *
SET VECTOR PRINT OFF EJECT // toggle vector off, eject
Purpose: Set the vector print feature ON or OFF
Mapped Function: __SetVectorPrint() contained in GLLIBR.PRG.
dGE functions: printps(),vpon(),vpoff()
Other GL UDFs: None.
System variables: None.
System constants: None.
- In previous versions, there were certain hard coded row and column
increments that were in use to automatically adjust the height and width
of frames and positioning of text. This caused some confusion when using
the DRAW BOX, DEFINE EVENT REGION, and DRAW TEXT commands together. The
confusion has been eliminated and now all row and column positioning is
performed without these subtle adjustments.
______________________________________________________________________________
Change Summary: 30 Nov 1990 to 31 Dec 1991 [Beta v1.0b]
- A resturcturing of the object array has resulted in a more formal declar-
ation of creating, activating, deactivating, and releasing event object
and such. The following commands have been added and/or restructured.
- Event Objects:
──────────────────────────────────────────────────────────────────────────
Event objects make up the basic structure that support the event menuing
system. Each event has a click area that is the same size and coordintes
of the physical object or an invisible event region. The click area does
not include a shadow area if specified. Currently, there are two types
of event objects supported; invisible region, and super icon button. The
commands asterisked(*) are planned for the near future.
DEFINE EVENT <label> // event region (no object)
FROM <Pos1_a>,<Pos1_b> // upper left coordinates
TO <Pos2_a>,<Pos2_b> // lower right coordinates
[ACTIVATE] // optionally arm the region
DEFINE EVENT <label> // icon event object
AT <Pos1>,<Pos2> // center point coordinate
USING SUPERICON <icon> // specify a super icon
[ACTIVATE] // display and activate icon button
[SHADOW] // display drop shadow
*DEFINE EVENT <label> // text event object
FROM <Pos1_a>,<Pos1_b> // upper left coordinates
TO <Pos2_a>,<Pos2_b> // lower right coordinates
USING TEXT [<string>] // specify type and [text]
[ACTIVATE] // display and activate text button
[BOX] // optionally display a frame
[SHADOW] // display drop shadow
*DEFINE EVENT <label> // check box event object
AT <Pos1>,<Pos2> // center point coordinate
USING CHECK BOX [<title>] // specify type and [title]
[ACTIVATE] // display and activate check box
*DEFINE EVENT <label> // radio button event object
AT <Pos1>,<Pos2> // center point coordinate
USING RADIO BUTTON [<title>] // specify type and [title]
[ACTIVATE] // display and activate radio button
ACTIVATE EVENT <label> // activate event object and display
FLASH EVENT <label> // clear and redraw event object
MOVE EVENT <label> TO <Pos1>,<Pos2> // move event region and object
WAIT EVENT TO <memvar> // process all active events
[NOFLASH] // supress select flash
WAIT EVENT <label> // process a single event object
[DEACTIVATE] // optionally deactivate
[RELEASE] // optionally release the event
DEACTIVATE EVENT <label> // deactivate event object
[CLEAR] // clear from screen also
RELEASE EVENT <label> // kills the event and clears
For example, the procedure for prompting for multiple icon buttons in
various locations on the screen would be accomplished like this:
CLEAR // clear the text screen (std Clipper 5.0 command)
SET GRAPHICS ON // graphics mode
SET MOUSE ON // turn on the mouse
SET ICON TO DEMO.ICO // load the super icon file
CLEAR GRAPHICS SCREEN // clear the graphics screen
DEFINE EVENT "one" AT 03,08 USING SUPERICON 2 SHADOW ACTIVATE
DEFINE EVENT "two" AT 09,08 USING SUPERICON 4 SHADOW ACTIVATE
DEFINE EVENT "three" AT 15,08 USING SUPERICON 6 SHADOW ACTIVATE
DEFINE EVENT "four" AT 21,08 USING SUPERICON 7 SHADOW ACTIVATE
DEFINE EVENT "five" AT 21,63 USING SUPERICON 1 SHADOW ACTIVATE
WAIT EVENT TO LABEL_ // wait for a mouse click
DO CASE // evaluate the choice
CASE LABEL_ == "one" // if button one was clicked
... // process code for button one
CASE LABEL_ == "two" // if button one was clicked
... // process code for button one
So, for example, the procedure for prompting for a single mouse click
at any location on the screen would be accomplished like this:
DEFINE EVENT "pause" ; // define and activate the event
FROM 00,00 TO 24,79 ; // specify the location
ACTIVATE // activate the event region
WAIT EVENT "pause" RELEASE // wait for a mouse press
- For our neighbors to the south (Australia) and those to the east (UK),
I've added support for the word COLOUR. Wherever the COLOR statement is
documented, you may also use alternate.
- Added support for the clipwin() function. SET DRAWING AREA has been
assigned as the command for this function, and the syntax is shown below.
SET DRAWING AREA [FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>]
Using this command without the FROM...TO clause will cause the drawing
area to be set to dGE's default of the entire visible screen.
- Added support for the snapcopy(), snappaste(), and snapkill() functions.
The commands to effect a screen save and restore are shown below.
SAVE GRAPHICS SCREEN <label> ;
FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>
RESTORE GRAPHICS SCREEN <label>
The intelligence to support the saving and restoring of screen by using a
simple <label> name is possible through the use of a small array that
contains the dGE snapcopy() handle, label name, and positional co-
ordinates. The array is named _screens_[] and is created when the Graphics
language is initialized by SET GRAPHICS ON.
- Added support for the prndev() function. The command syntax is shown
below.
SET GRAPHICS PRINT TO <device> ON <channel>
Where <device> is either "LPT" or "COM", and <channel> is either "LPT1"
or "LPT2". Optionally, the more verbose arguments are supported as shown.
For example, the following syntaxes are supported. There are no defaults
and both arguments must be specified.
SET GRAPHICS PRINT TO parallel ON com1
SET GRAPHICS PRINT TO serial ON com2
- Removed the NORESET option in the command SET GRAPHICS TO per BPS
request.
- Changed MaxObjects preprocessor constant to 70 as per BPS request.
- A new command SET DGE RESOURCES has been added so that supporting files
such as character sets, icon files, super font files can be found by your
applications without specifying the path in the command statements. The
search hierarhy is based first on a specified SET DGE RESOURCES command.
If a SET command has not been issued, the search for resource files con-
tinues with a look at the DOS environment for a DGE environment variable.
Lacking an environmnt variable, the current directory is assumed to be the
location of all resource files. Note that like other Grahics Language
commands, SET DGE RESOURCES must be used after SET GRAPHICS ON has been
issued.
- The following new syntax formats are now supported in addition to the ones
currently documented. For example, DRAW <string> AT Pos1,Pos2 is supported
in addition to the more consistent form listed below.
@ Pos1,Pos2 DRAW <string>
@ Pos1,Pos2 DRAW STANDARD ICON <icon>
@ Pos1,Pos2 DRAW SUPER ICON <icon>
- Overlay, and composite icons, although difficult to achieve, are available
in this release of the graphics language. It is accomplished by simply
overlaying 4 separate icon images to achieve color seperations and other
special effects. This involves the creation of icon image collections, 2
per icon file that work in unison to effect 4 separate image planes for an
overlay, and 4 adjoining icons for a composite display.
The command to display a composite icon is shown below:
DRAW SUPER ICON 0 AT 10,10 COMPOSITE
The example shown above will use super icon positions 0 through 3 in the
current icon file to make a composite icon display at the specified center
point. Each icon in the display will adjoin at position 10,10.
The command to display an overlay icon in four different colors is shown
below:
DRAW SUPER ICON 0 AT 10,10 OVERLAY 7 3 15 9
This example will use super icon positions 0 through 3 to make a composite
icon display using the colors listed after the OVERLAY option.
Eventually, we'll change the command so that words or numbers can be used
to specify the color settings for each of the planes. The problem of
course, is that GFONT is incapable of easily designing color icons, so you
have to improvise by creating the full icon in one icon position, and then
copy it to the other three locations while removing the pixels that
correspond to each of the other three colors desired in the icon. In an
effort to make this a useful feature, we've provided a few basic icons that
demonstrate the concept.
This capability is not intended to be THE color icon support for dGE. The
ability to display color icons is simply a by-product of the OVERLAY
clause. The OVERLAY clause was added to enable parts of icons to be used
to create a single image.
- A new file named DGELIBR.ICO has been created that provides for specific
icon management support. It must be in the DGE environment path, or in
a directory specified in the SET DGE RESOURCES command. Lacking either
of these, the file must be in the current directory of the application
that uses the Graphics Language. Currently, its only purpose is for clear-
ing and displaying the shadowing of icons. If you are not using the sha-
dow options for icons, this file will not be called upon by your applica-
tions.
______________________________________________________________________________
Operational Notes:
- This product requires a mouse and either EGA or VGA video support.
- This product requires Clipper 5.0 and dGE 4.1. You must be familiar
with compiling and linking Clipper 5.0 applications and dGE graphics
support before attempting to use this product.
- Some of the icon files have not been duplicated in inverse format.
DEMO.ICO is a copy of ICONS000.ICO. In all, there are 88 icons in-
cluded with the Graphics Language. There is no specific documentation
provided showing each icon but there is a utility included that will
display each super icon files' contents. The utility is called
VIEWICON and must be compiled first. The syntax for using it follows.
C:\GLDEMO> viewicon sample <cr>
The icon viewer is capable of displaying composite icons as well. The
syntax is shown below.
C:\GLDEMO> viewicon composit /c
- Watch for the release of the dGE Icon Library with more than 1000
icons. It will be available from Pinnacle Publishing, Inc.
- If the \CLIPPER\INCLUDE or \CLIPPER\LIB directories do not exist on the
drive specified at installation time, the files GLLIBR.CH and GLLIBR.LIB
will not be copied. The installation file assumes Clipper 5.0 has been
installed first.
______________________________________________________________________________
Demo Program:
The sample program contains not a single dGE function call. Only english
like statements of the Graphics Language for Clipper 5.0. Most of it is
commented and much of it is self explanatory. The menu it produces is
quite impressive considering it is less than 20 lines of code. The entire
program including charts is only about 100 lines.
Compiling is accomplished in ordinary fashion but does require the Graphics
Language header file GLLIBR.CH to be present in the compilation directory
or in the Clipper 5.0 INCLUDE directory. Additionally, you must link in
GLLIBR.LIB in addition to the standard dGE screen drivers and library.
At run-time, this program requires the dGE character sets listed below.
DEMO.PRG also uses DEMO.ICO which contains all of the icons for the
menu. The demo program will look for these files on the C: drive for
a directory named \DGERES. DEMO.ICO is simply a copy of ICONS000.ICO.
DGE0EGA.CHR RMN1628.STX
DGE1EGA.CHR RMN2828.STX
DGE1108.STX RMN3828.STX
DGE1609.STX
A batch file to compile DEMO.PRG has also been included named
CDEMO.BAT.
Bill French
Global Technologies Corporation
(303) 337-7758 [CompuServe 71350,461]